package com.peakmain.wanandroid.netmodule.di.module;

import android.content.Context;

import com.peakmain.wanandroid.netmodule.NetApplication;
import com.peakmain.wanandroid.netmodule.di.scop.ContextLife;
import com.peakmain.wanandroid.netmodule.di.scop.PerApp;

import dagger.Module;
import dagger.Provides;

/**
 * author peakmain
 * createdata：2019/7/10
 * mail:2726449200@qq.com
 * desiption:
 */
@Module
public class ApplicationModule {

    private NetApplication mApplication;

    public ApplicationModule(NetApplication application) {
        this.mApplication = application;
    }

    @PerApp
    @Provides
    @ContextLife("Application")
    public Context provideApplication(){
        return mApplication.getApplicationContext();
    }
}
